-- GENERATED SPELL FOR [Arch Druid Fandral Staghelm] --


function spell0_3516(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(20699,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3516', 15000, 1)
end

function spell1_3516(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(20701,pUnit)
pUnit:RegisterEvent('Sorts_3516', 12000, 1)
end

function spell2_3516(pUnit, Event) --@Summon Treant Allies,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(20702,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_3516', 1, 1)
end

function spell3_3516(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(20698,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3516', 1000, 1)
end

function Sorts_3516(pUnit, Event)
local choix_sorts_3516 = math.random(0, 3)
if choix_sorts_3516 == 0 then
pUnit:RegisterEvent('spell0_3516', 1, 1)
end
if choix_sorts_3516 == 1 then
pUnit:RegisterEvent('spell1_3516', 1, 1)
end
if choix_sorts_3516 == 2 then
pUnit:RegisterEvent('spell2_3516', 1, 1)
end
if choix_sorts_3516 == 3 then
pUnit:RegisterEvent('spell3_3516', 1, 1)
end
end

function mob3516_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3516', math.random(1500, 3000), 1)
end

function mob3516_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3516_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3516_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3516, 1, 'mob3516_Action')
RegisterUnitEvent(3516, 2, 'mob3516_Leave')
RegisterUnitEvent(3516, 3, 'mob3516_Kill')
RegisterUnitEvent(3516, 4, 'mob3516_Die')
